package com.heng.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heng.dao.entity.product.CategoryEntity;
import com.heng.dao.mapper.CategoryMapper;
import com.heng.service.CategoryService;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, CategoryEntity> implements CategoryService {

    @Override
    public List<CategoryEntity> getTopCategory() {
        return baseMapper.selectTopCategory();
    }

    @Override
    public List<CategoryEntity> getByParentId(Integer parentId) {
        return baseMapper.selectByParentId(parentId);
    }
}